API Documentation
Public Member Functions | List of all members
nkDebug::FunctionSet Class Referencefinal

A function set holding testing functions. More...

Public Member Functions

 FunctionSet ()
 
 ~FunctionSet ()
 
const std::function< void()> & registerFunction (const char *name, const std::function< void()> &func)
 
nkLog::StringView getFunctionName (unsigned int index) const
 
const std::function< void()> & getFunction (unsigned int index) const
 
unsigned int getSetSize () const
 

Detailed Description

A function set holding testing functions.

Mainly used internally to keep track of registered functions.

Constructor & Destructor Documentation

◆ FunctionSet()

nkDebug::FunctionSet::FunctionSet ( )

Default constructor.

◆ ~FunctionSet()

nkDebug::FunctionSet::~FunctionSet ( )

Destructor.

Member Function Documentation

◆ registerFunction()

const std::function<void ()>& nkDebug::FunctionSet::registerFunction ( const char *  name,
const std::function< void()> &  func 
)

Register a new function into the set.

Parameters
nameThe function name to attach.
funcThe function to call.
Returns
A reference over the function registered.

◆ getFunctionName()

nkLog::StringView nkDebug::FunctionSet::getFunctionName ( unsigned int  index) const

Allows to retrieve the name of a registered function at a given index.

Parameters
indexThe index of the function to check for.
Returns
The function name attached.

◆ getFunction()

const std::function<void ()>& nkDebug::FunctionSet::getFunction ( unsigned int  index) const

Allows to retrieve a function at a given index.

Parameters
indexThe index of the function to check for.
Returns
The function requested.

◆ getSetSize()

unsigned int nkDebug::FunctionSet::getSetSize ( ) const
Returns
The number of functions registered in the set.

The documentation for this class was generated from the following file: